<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function hello(){
				window.alert('hello!')
			}
		</script>
	</head>
	<body>
		<a href="#" onclick="hello();">onclick属性调用函数</a>
		<a href="javascript:hello();">href属性调用函数</a>
	</body>
</html>